Skip to content

[PR #14254/2aa07343 backport][9.0.x] docs: guard pytestconfig.cache example when cacheprovider is disabled#14433

Merged
nicoddemus merged 1 commit into
9.0.xfrom
patchback/backports/9.0.x/2aa07343b6ebcb426f4cc595e3bf1912b0a442de/pr-14254
May 1, 2026
Merged

[PR #14254/2aa07343 backport][9.0.x] docs: guard pytestconfig.cache example when cacheprovider is disabled#14433
nicoddemus merged 1 commit into
9.0.xfrom
patchback/backports/9.0.x/2aa07343b6ebcb426f4cc595e3bf1912b0a442de/pr-14254

Conversation

@patchback

@patchback patchback Bot commented May 1, 2026

Copy link
Copy Markdown

This is a backport of PR #14254 as merged into main (2aa0734).

  • Include documentation when adding new features.
  • Include new tests or update existing tests when applicable.
  • Allow maintainers to push and squash when merging my commits.

Description

Update the config.cache example in doc/en/how-to/cache.rst to safely handle cases where the cacheprovider plugin is disabled.

The fixture now uses getattr(pytestconfig, "cache", None) and falls back gracefully when cache support is unavailable, which avoids AttributeError in the documented pattern.

Closes #14148

…#14254)

Update the `config.cache` example in `doc/en/how-to/cache.rst` to safely handle cases where the `cacheprovider` plugin is disabled.

Closes #14148

(cherry picked from commit 2aa0734)
@nicoddemus nicoddemus enabled auto-merge (squash) May 1, 2026 11:26
@nicoddemus nicoddemus merged commit 6e8f514 into 9.0.x May 1, 2026
33 checks passed
@nicoddemus nicoddemus deleted the patchback/backports/9.0.x/2aa07343b6ebcb426f4cc595e3bf1912b0a442de/pr-14254 branch May 1, 2026 11:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants